package com.secxiot.provider.user.service;

import com.secxiot.provider.user.entity.SysExchangeRecord;
import com.secxiot.provider.user.entity.SysExchangeRules;

import java.util.List;

public interface IntegralService {
    /**
     * 获取兑换规则
     *
     * @param userId
     * @return
     */
    List<SysExchangeRules> getExchangeRules(Long userId);

    /**
     * 积分兑换
     *
     * @param userId          用户ID
     * @param integralNum     积分数量
     * @param exchangeRulesId 规则ID
     * @return
     */
    Integer integralExchange(Long userId, Long integralNum, Long exchangeRulesId);

    /**
     * 获取兑换列表
     *
     * @param userId
     * @param pageNo
     * @param pageSize
     * @return
     */
    List<SysExchangeRecord> getExchangeRecordList(Long userId, Long pageNo, Long pageSize);
}
